package com.weimob.mcloud.wechatwork.customer.service.user.enums;

import lombok.Getter;

/**
 * 转换为短链的类型枚举
 *
 * @Author LeoLee
 * @Date 2022/6/23 14:19
 * @Version 1.0
 */
@Getter
public enum UrlConverTypeEnum {

    WEB_URL(0, "普通网页"),
    VIDEO_PICTURE_URL(1, "视频图片"),
    MUSIC_URL(2, "音乐"),
    ACTIVITY_URL(3, "活动"),
    VOTE_URL(4, "投票");

    private Integer type;

    private String desc;

    UrlConverTypeEnum(Integer type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static UrlConverTypeEnum valueOf(Integer typeCode) {
        for (UrlConverTypeEnum e : values()) {
            if (e.getType().equals(typeCode)) {
                return e;
            }
        }
        return null;
    }
}
